//
//  NeedRepairParts.m
//  Ghac 4S
//
//  Created by apple apple on 12-1-8.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import "NeedRepairParts.h"

@implementation NeedRepairParts
@synthesize model;
@synthesize cycle;
@synthesize name;
@synthesize price;
@synthesize type;
@synthesize isHandled;


-(id)initWithCoder:(NSCoder *)aDecoder
{
    if ((self = [super init]))
    {
        model = [[aDecoder decodeObjectForKey:@"model"] retain];
        type = [[aDecoder decodeObjectForKey:@"type"] retain];
        name = [[aDecoder decodeObjectForKey:@"name"] retain];
        cycle = [[aDecoder decodeObjectForKey:@"cycle"] retain];
        price = [[aDecoder decodeObjectForKey:@"price"] retain];
        isHandled = [aDecoder decodeBoolForKey:@"isHandled"];
    }
    return self;
}
-(void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:model forKey:@"model"];
    [aCoder encodeObject:type forKey:@"type"];
    [aCoder encodeObject:name forKey:@"name"];
    [aCoder encodeObject:cycle forKey:@"cycle"];
    [aCoder encodeObject:price forKey:@"price"];
    [aCoder encodeBool:isHandled forKey:@"isHandled"];
}
-(NSString *)description
{
    return [NSString stringWithFormat:@"[NeedRepairParts model:%@ type:%@ name:%@ cycle:%@ price:%@ isHandled:%d", model, type, name, cycle, price, isHandled];
}
-(void)dealloc
{
    [model release];
    [type release];
    [name release];
    [cycle release];
    [price release];
    [super dealloc];
}
@end
